import service from "@/utils/request";

export enum EventType {
	edit = 'edit',
	preview = 'preview',
}




/**
 * 获取 WPS 文档链接
 *
 * @param params WPS 参数对象
 * @returns WPS 文档链接
 */
export function getWpsUrl(id: Number, type: EventType, params?: Record<string, any>) {
	return service({
		url: type === 'edit' ? `/wps/link/getEditUrl/${id}` : `/wps/link/getPreviewUrl/${id}`,
		method: 'get',
		params,
	});
};